﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using DocManagerORM.Caching;
using DocManagerORM.ORM;

namespace DocManagerControls.CLASSI
{
   public class CategorieList :List<DocManagerORM.ORM.Categorie>
    {

        public CategorieList()
        {
            var list = DocManagerORM.Caching.CacheBase.getDati<Categorie>("Categorie");
            this.AddRange(list); 
        }

        private object CacheBase<T1>(string p)
        {
            throw new NotImplementedException();
        }


//       myComboBox.ItemsSource = myItemsList;

//myComboBox.IsEditable = true;

//myComboBox.IsTextSearchEnabled = false;

//myComboBox.Loaded += delegate

//{

//   TextBox textBox = myComboBox.Template.FindName("PART_EditableTextBox", myComboBox) as TextBox;

//   Popup popup = myComboBox.Template.FindName("PART_Popup", myComboBox) as Popup;

//   if (textBox != null)

//   {

//       textBox.TextChanged += delegate

//       {

//           popup.IsOpen = true;

//           myComboBox.Items.Filter += a =>

//           {

//                myItems selectedItem = (myItems)a;

//                if (a.ToString().Contains(textBox.Text))

//                {

//                     return true;

//                }

//                else

//                {

//                     return false;

//                }

//            };

//       };

//   }

//};
        
    }
}
